<script language="javascript">

$(document).ready(function(){ldelim}

    var sett_options = {ldelim}
		url: 'index.php?do=settings&sub=countries&cp={$sess}&save=1',
		beforeSubmit: Request,
        success: Response
	{rdelim}

//    $(".ConfirmSettings").click(function(e){ldelim}
//		e.preventDefault();
//		var title = '{#SETTINGS_BUTTON_SAVE#}';
//		var confirm = '{#SETTINGS_SAVE_CONFIRM#}';
//		jConfirm(
//				confirm,
//				title,
//				function(b){ldelim}
//					if (b){ldelim}
//        				$("#settings").ajaxSubmit(sett_options);
//					{rdelim}
//				{rdelim}
//			);
//	{rdelim});

{rdelim});

function Request(){ldelim}
	$.alerts._overlay('show');
	$('html, body').animate({ldelim}scrollTop:0{rdelim});
{rdelim}

function Response(){ldelim}

	$.alerts._overlay('hide');
	$.jGrowl('{#SETTINGS_SAVED#}');
{rdelim}

</script>

<div class="title"><h5>Управление языками</h5></div>




<div class="breadCrumbHolder module">
	<div class="breadCrumb module">
	    <ul>
	        <li class="firstB"><a href="index.php" title="{#MAIN_PAGE#}">{#MAIN_PAGE#}</a></li>
	        <li><a href="index.php?do=settings&amp;cp={$sess}">{#SETTINGS_MAIN_TITLE#}</a></li>
			<li>Управление языками</li>
	    </ul>
	</div>
</div>


<div class="widget first">
<div class="head"><h5 class="iFrames">{#SETTINGS_INFO#}</h5></div>
    <div class="body">
		<a href="index.php?do=settings&amp;cp={$sess}" title="" class="btnIconLeft mr10"><img src="{$tpl_dir}/images/icons/cog3.png" alt="" class="icon" /><span>{#SETTINGS_MAIN#}</span></a>
		<a href="index.php?do=settings&amp;sub=countries&amp;cp={$sess}" title="" class="btnIconLeft mr10"><img src="{$tpl_dir}/images/icons/cog3.png" alt="" class="icon" /><span>{#MAIN_COUNTRY_EDIT#}</span></a>
		
		<a href="index.php?do=settings&amp;sub=case&amp;cp={$sess}" title="" class="btnIconLeft mr10"><img src="{$tpl_dir}/images/icons/cog3.png" alt="" class="icon" /><span>{#SETTINGS_CASE_TITLE#}</span></a>
		<a href="#" title="" class="btnIconLeft mr10 clearCacheSess"><img src="{$tpl_dir}/images/icons/cog3.png" alt="" class="icon"><span>{#MAIN_STAT_CLEAR_CACHE#}</span></a>

    </div>
</div>

<div class="widget first">
{*
<form id="settings" name="settings" method="post" action="index.php?do=settings&sub=countries&cp={$sess}&save=1" class="mainForm">
*}
<div class="head"><h5 class="iFrames">Список языков</h5></div>

			<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic">
            	<thead>
                	<tr>
                        <td width="20%">Название языка</td>
                        <td width="20%">Кодировка языка</td>
                        <td width="1%">Действие</td>
                    </tr>
                </thead>
                <tbody>
{if $lang}                
			{foreach from=$lang item=lang name=l}
			<tr>
				<td>
					<strong>{$lang.lang_name}</strong>
				</td>

				<td>
					<strong>{$lang.lang_code}</strong>
				</td>
				<td>
					<a onclick="return confirm('Данное действие необратимо и может иметь существенные последствия, поля с информацией относящейся к данному языку будут удалены из системы. Вы уверены?');" class="icon_sprite ico_delete" href="index.php?do=settings&sub=lang&act=del&langn={$lang.lang_code}&id={$lang.id}&cp={$sess}{if $smarty.request.page!=''}&page={$smarty.request.page}{/if}"></a>
				</td>
			</tr>
			{/foreach}
{else}
	<tr>
		<td colspan="8">
			<ul class="messages">
				<li class="highlight yellow">Нету установленных языков - такого быть не может</li>
			</ul>
		</td>
	</tr>
{/if}			
			
			
			
                </tbody>
            </table>
</div> 
<br/>
{*
			<div class="rowElem">
				<input type="submit" class="basicBtn ConfirmSettings" value="{#SETTINGS_BUTTON_SAVE#}" />
			</div>


</form>
*}
<div class="widget first">
<div class="head"><h5 class="iFrames">Добавить новый язык</h5></div>
<div>
	<form action="index.php?do=settings&sub=lang&act=new&cp={$sess}" method="post" class="mainForm">
	<div class="hash"></div>
	<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic">
	<tr>
	    <td width="20%">Название языка</td>
	    <td width="20%">Кодировка языка (2 символа)</td>
	</tr>
	<tr>
		<td>
			<input name="lang_name" type="text" id="lang_name" value="" style="width: 95%;"/>
		</td>
		<td>
			<input name="lang_code" type="text" id="lang_code" value="" size="2" style="width: 95%;"/>
		</td>
	</tr>
	</table>
	<div class="clear" style="height: 5px;"></div>
	<input style="margin-right: 20px; float: right;" type="submit" class="basicBtn topDir" value="Добавить" />
	<input name="id" type="hidden" value="{$id}">
	<div class="clear"></div>
	
	</form>
</div>

{if $page_nav}
	<div class="pagination">
	<ul class="pages">
		{$page_nav}
	</ul>
	</div>
{/if}
<br />
</div>